﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using FM.Common;
using FM.Events;
using FM.Services;
using FM.录音.Data;
using FM.录音.Events;
using FM.录音.Services;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.Mvvm;
using Microsoft.Practices.Prism.PubSubEvents;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;

namespace FM.录音.ViewModels
{
    public class 选项窗口ViewModel : Vm基类<dynamic>
    {
        
        public 选项窗口ViewModel(IEventAggregator 新闻部cs, IUnityContainer 人事部cs, IRegionManager 行政部cs)
        {
            this.人事部 = 人事部cs;
            this.行政部 = 行政部cs;
            this.新闻部 = 新闻部cs;
            加载模块();
       
            人事部.Resolve<选项子视图调用服务>().启动();

        }


        private void 加载模块()
        {
            行政部.RegisterViewWithRegion(位置.选项下, () =>
            {
                var 视图2 = 人事部.Resolve<Views.选项命令>();
                视图2.LoadViewModel();
                return 视图2;
            });

            行政部.RegisterViewWithRegion(位置.选项左, () =>
            {
                var 视图2 = 人事部.Resolve<Views.选项导航>();
                视图2.LoadViewModel();
                return 视图2;
            });
        }
    }
}